  <!-- *** CUT top -->
  <table width="800"  border="0" cellspacing="0" cellpadding="0" class="form" id="settings_images_top_table">
    <tr>
      <td align="left">
        <table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td>
              <div class="form_title">Images settings</div>
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <!-- If you don't want notes erase this START -->
    <tr>
      <td>
        <table width="100%"  border="0" cellspacing="0" cellpadding="0" class="form_note">
          <!-- Repeat this fo additional notes START -->
          <tr>
            <td valign="top" align="left">
              <table width="100%"  border="0" cellspacing="0" cellpadding="4" class="form_note_title">
                <tr>
                  <td><img src="img/modules/form_html_tpl_static_ajax_metallic/exclamation_mark.png" border="0" alt="icon exclamation mark"  width="16" height="16" /></td>
                  <td width="100%" align="left">Note:</td>
                </tr>
              </table>
            </td>
            <td align="left" width="99%">
              <div class="form_note_text">Fields marked with &quot;*&quot; are mandatory.</div>
            </td>
          </tr>
          <!-- Repeat this fo additional notes END-->
        </table>
      </td>
    </tr>
    <!-- If you don't want notes erase this END -->
    <tr>
      <td>
        <div id="settings_images">
          <form onsubmit="submit_ajax_settings_images(); return false;" action="admin/modules/tangra_cms/settings/settings_content_edit.php" method="post" name="settings_images_form" enctype="application/x-www-form-urlencoded">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="left">
                  <table width="100%"  border="0" cellspacing="0" cellpadding="0" class="form_row">
                    <tr>
                      <td class="form_even_row">
                        <!-- form_field_text settings_images_allowed_extensions START-->
                        <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                          <tr>
                            <td width="180">
                              <div align="right">Allowed extensions*:</div>
                            </td>
                            <td width="1%">
                              <input class="form" name="settings_images_allowed_extensions" type="text" value="{$settings_images_allowed_extensions_val}" maxlength="255" size="40" id="settings_images_allowed_extensions"/>
                            </td>
                            <td><img src="/img/modules/crystal_icons_small/16x16/help.png" alt="help" width="16" height="16" {popup text="Comma separated list of file extensions that will be allowed for upload."} /></td>
                          </tr>
                          {if $settings_images_allowed_extensions_has_error}
                          <!-- Potential errors START -->
                          {if $settings_images_allowed_extensions_error_mandatory_missing}
                          <!-- mandatory_missing START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Field is mandatory.</div>
                            </td>
                          </tr>
                          <!-- mandatory_missing END -->
                          {/if}
                          {if $settings_images_allowed_extensions_error_max_length_exceeded}
                          <!-- max_length_exceeded START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Allowed maximum of 255 characters exceeded.</div>
                            </td>
                          </tr>
                          <!-- max_length_exceeded END -->
                          {/if}
                          <!-- Potential errors END -->

                          {/if}
                        </table>
                        <!-- form_field_text settings_images_allowed_extensions END-->
                      </td>
                    </tr>
                    <tr>
                      <td class="form_odd_row">
                        <!-- form_field_integer_positive settings_images_to_size_x START-->
                        <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                          <tr>
                            <td width="180">
                              <div align="right">Resize to width*:</div>
                            </td>
                            <td width="1%">
                              <input class="form" name="settings_images_to_size_x" type="text" value="{$settings_images_to_size_x_val}" maxlength="6" size="40" id="settings_images_to_size_x" />
                            </td>
                            <td>
                              <img src="/img/modules/crystal_icons_small/16x16/help.png" alt="help" width="16" height="16" {popup text="All images are resized after upload and new image files are created. Enter here desired width of the resized images."} />
                            </td>
                          </tr>
                          {if $settings_images_to_size_x_has_error}
                          <!-- Potential errors START -->
                          {if $settings_images_to_size_x_error_mandatory_missing}
                          <!-- mandatory_missing START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Field is mandatory.</div>
                            </td>
                          </tr>
                          <!-- mandatory_missing END -->
                          {/if}
                          {if $settings_images_to_size_x_error_max_length_exceeded}
                          <!-- max_length_exceeded START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Allowed maximum of 6 characters exceeded.</div>
                            </td>
                          </tr>
                          <!-- max_length_exceeded END -->
                          {/if}
                          {if $settings_images_to_size_x_error_not_a_number}
                          <!-- not_a_number START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Must be number.</div>
                            </td>
                          </tr>
                          <!-- not_a_number END -->
                          {/if}
                          {if $settings_images_to_size_x_error_not_an_integer}
                          <!-- not_an_integer START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Must be integer value.</div>
                            </td>
                          </tr>
                          <!-- not_an_integer END -->
                          {/if}
                          {if $settings_images_to_size_x_error_integer_not_positive}
                          <!-- integer_not_positive START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Value must be positive.</div>
                            </td>
                          </tr>
                          <!-- integer_not_positive END -->
                          {/if}
                          <!-- Potential errors END -->
                          {/if}
                        </table>
                        <!-- form_field_integer_positive settings_images_to_size_x END-->
                      </td>
                    </tr>
                    <tr>
                      <td class="form_even_row">
                        <!-- form_field_integer_positive settings_images_to_size_y START-->
                        <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                          <tr>
                            <td width="180">
                              <div align="right">Resize to heigth*:</div>
                            </td>
                            <td width="1%">
                              <input class="form" name="settings_images_to_size_y" type="text" value="{$settings_images_to_size_y_val}" maxlength="6" size="40" id="settings_images_to_size_y" />
                            </td>
                            <td>
                              <img src="/img/modules/crystal_icons_small/16x16/help.png" alt="help" width="16" height="16" {popup text="All images are resized after upload and new image files are created. Enter here desired height of the resized images."} />
                            </td>
                          </tr>
                          {if $settings_images_to_size_y_has_error}
                          <!-- Potential errors START -->
                          {if $settings_images_to_size_y_error_mandatory_missing}
                          <!-- mandatory_missing START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Field is mandatory.</div>
                            </td>
                          </tr>
                          <!-- mandatory_missing END -->
                          {/if}
                          {if $settings_images_to_size_y_error_max_length_exceeded}
                          <!-- max_length_exceeded START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Allowed maximum of 6 characters exceeded.</div>
                            </td>
                          </tr>
                          <!-- max_length_exceeded END -->
                          {/if}
                          {if $settings_images_to_size_y_error_not_a_number}
                          <!-- not_a_number START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Must be number.</div>
                            </td>
                          </tr>
                          <!-- not_a_number END -->
                          {/if}
                          {if $settings_images_to_size_y_error_not_an_integer}
                          <!-- not_an_integer START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Must be integer value.</div>
                            </td>
                          </tr>
                          <!-- not_an_integer END -->
                          {/if}
                          {if $settings_images_to_size_y_error_integer_not_positive}
                          <!-- integer_not_positive START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Value must be positive.</div>
                            </td>
                          </tr>
                          <!-- integer_not_positive END -->
                          {/if}
                          <!-- Potential errors END -->
                          {/if}
                        </table>
                        <!-- form_field_integer_positive settings_images_to_size_y END-->
                      </td>
                    </tr>
                    <tr>
                      <td class="form_odd_row">
                        <!-- form_field_integer_limited settings_images_jpg_quality START-->
                        <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                          <tr>
                            <td width="180">
                              <div align="right">JPG quality of resized image*:</div>
                            </td>
                            <td width="1%">
                              <input class="form" name="settings_images_jpg_quality" type="text" value="{$settings_images_jpg_quality_val}" maxlength="2" size="40" id="settings_images_jpg_quality" />
                            </td>
                            <td>
								<img src="/img/modules/crystal_icons_small/16x16/help.png" alt="help" width="16" height="16" {popup text="Resized images are saved in JPG format. Enter here JPG quality that will be used. <br>Allowed values 1 - 99.<br> Recommended value = 80."} />
                            </td>
                          </tr>
                          {if $settings_images_jpg_quality_has_error}
                          <!-- Potential errors START -->
                          {if $settings_images_jpg_quality_error_mandatory_missing}
                          <!-- mandatory_missing START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Field is mandatory.</div>
                            </td>
                          </tr>
                          <!-- mandatory_missing END -->
                          {/if}
                          {if $settings_images_jpg_quality_error_max_length_exceeded}
                          <!-- max_length_exceeded START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Allowed maximum of 2 characters exceeded.</div>
                            </td>
                          </tr>
                          <!-- max_length_exceeded END -->
                          {/if}
                          {if $settings_images_jpg_quality_error_not_a_number}
                          <!-- not_a_number START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Must be number.</div>
                            </td>
                          </tr>
                          <!-- not_a_number END -->
                          {/if}
                          {if $settings_images_jpg_quality_error_not_an_integer}
                          <!-- not_an_integer START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Must be integer value.</div>
                            </td>
                          </tr>
                          <!-- not_an_integer END -->
                          {/if}
                          {if $settings_images_jpg_quality_error_integer_greater}
                          <!-- integer_greater START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Entered value is bigger than expected maximum of 99.</div>
                            </td>
                          </tr>
                          <!-- integer_greater END -->
                          {/if}
                          {if $settings_images_jpg_quality_error_integer_smaller}
                          <!-- integer_smaller START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Entered value is smaller than expected minimum of 1.</div>
                            </td>
                          </tr>
                          <!-- integer_smaller END -->
                          {/if}
                          <!-- Potential errors END -->
                          {/if}
                        </table>
                        <!-- form_field_integer_limited settings_images_jpg_quality END-->
                      </td>
                    </tr>
                    <tr>
                      <td class="form_even_row">
                        <!-- form_field_text settings_images_bgcolor START-->
                        <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                          <tr>
                            <td width="180">
                              <div align="right">Background color*:</div>
                            </td>
                            <td width="1%">
                              <input class="form" name="settings_images_bgcolor" type="text" value="{$settings_images_bgcolor_val}" maxlength="6" size="40" id="settings_images_bgcolor"/>
                            </td>
                            <td>
								<img src="/img/modules/crystal_icons_small/16x16/help.png" alt="help" width="16" height="16" {popup text="Background color for resized image and thumbnails."} />                            
                            </td>
                          </tr>
                          {if $settings_images_bgcolor_has_error}
                          <!-- Potential errors START -->
                          {if $settings_images_bgcolor_error_mandatory_missing}
                          <!-- mandatory_missing START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Field is mandatory.</div>
                            </td>
                          </tr>
                          <!-- mandatory_missing END -->
                          {/if}
                          {if $settings_images_bgcolor_error_max_length_exceeded}
                          <!-- max_length_exceeded START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Allowed maximum of 6 characters exceeded.</div>
                            </td>
                          </tr>
                          <!-- max_length_exceeded END -->
                          {/if}
                          {if $settings_images_bgcolor_error_invalid_value}
                          <!-- invalid_value START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: {include  file="modules/tangra_cms/forms/field_errors/settings_images/`$_language`/field_error_invalid_value_`$_language`.tpl"}</div>
                            </td>
                          </tr>
                          <!-- invalid_value END -->
                          {/if}
                          <!-- Potential errors END -->
                          {/if}
                        </table>
                        <!-- form_field_text settings_images_bgcolor END-->
                      </td>
                    </tr>                    
                    <tr>
                      <td class="form_odd_row">
                        <!-- form_field_checkboxsettings_images_keep_original START-->
                        <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                          <tr>
                            <td width="180">
                              <div align="right">Keep original image file*:</div>
                            </td>
                            <td width="1%">
                              <input class="form" name="settings_images_keep_original" type="checkbox" value="{$settings_images_keep_original_val}"{if $settings_images_keep_original_checked} checked="checked"{/if} id="settings_images_keep_original" />
                            </td>
                            <td><img src="/img/modules/crystal_icons_small/16x16/help.png" alt="help" width="16" height="16" {popup text="If checked original uploaded files will be kept after upload and creating of resized images. If lot of big images are uploaded it is good idea to uncheck this in order to prevent big usage of your disk quota."} /></td>
                          </tr>
                          {if $settings_images_keep_original_has_error}
                          <!-- Potential errors START -->
                          {if $settings_images_keep_original_error_mandatory_missing}
                          <!-- mandatory_missing START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Field is mandatory.</div>
                            </td>
                          </tr>
                          <!-- mandatory_missing END -->
                          {/if}
                          <!-- Potential errors END -->
                          {/if}
                        </table>
                        <!-- form_field_checkbox settings_images_keep_original END-->
                      </td>
                    </tr>
                    <tr>
                      <td class="form_even_row">
                        <!-- form_field_integer_positive settings_images_thumbnail1_size_x START-->
                        <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                          <tr>
                            <td width="180">
                              <div align="right">Thumbnail image 1 width*:</div>
                            </td>
                            <td width="1%">
                              <input class="form" name="settings_images_thumbnail1_size_x" type="text" value="{$settings_images_thumbnail1_size_x_val}" maxlength="6" size="40" id="settings_images_thumbnail1_size_x" />
                            </td>
                            <td>
                              <div align="left"><span style="white-space:nowrap">Positive integer value.</span></div>
                            </td>
                          </tr>
                          {if $settings_images_thumbnail1_size_x_has_error}
                          <!-- Potential errors START -->
                          {if $settings_images_thumbnail1_size_x_error_mandatory_missing}
                          <!-- mandatory_missing START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Field is mandatory.</div>
                            </td>
                          </tr>
                          <!-- mandatory_missing END -->
                          {/if}
                          {if $settings_images_thumbnail1_size_x_error_max_length_exceeded}
                          <!-- max_length_exceeded START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Allowed maximum of 6 characters exceeded.</div>
                            </td>
                          </tr>
                          <!-- max_length_exceeded END -->
                          {/if}
                          {if $settings_images_thumbnail1_size_x_error_not_a_number}
                          <!-- not_a_number START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Must be number.</div>
                            </td>
                          </tr>
                          <!-- not_a_number END -->
                          {/if}
                          {if $settings_images_thumbnail1_size_x_error_not_an_integer}
                          <!-- not_an_integer START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Must be integer value.</div>
                            </td>
                          </tr>
                          <!-- not_an_integer END -->
                          {/if}
                          {if $settings_images_thumbnail1_size_x_error_integer_not_positive}
                          <!-- integer_not_positive START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Value must be positive.</div>
                            </td>
                          </tr>
                          <!-- integer_not_positive END -->
                          {/if}
                          <!-- Potential errors END -->
                          {/if}
                        </table>
                        <!-- form_field_integer_positive settings_images_thumbnail1_size_x END-->
                      </td>
                    </tr>
                    <tr>
                      <td class="form_odd_row">
                        <!-- form_field_integer_positive settings_images_thumbnail1_size_y START-->
                        <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                          <tr>
                            <td width="180">
                              <div align="right">Thumbnail image 1 heigth*:</div>
                            </td>
                            <td width="1%">
                              <input class="form" name="settings_images_thumbnail1_size_y" type="text" value="{$settings_images_thumbnail1_size_y_val}" maxlength="6" size="40" id="settings_images_thumbnail1_size_y" />
                            </td>
                            <td>
                              <div align="left"><span style="white-space:nowrap">Positive integer value.</span></div>
                            </td>
                          </tr>
                          {if $settings_images_thumbnail1_size_y_has_error}
                          <!-- Potential errors START -->
                          {if $settings_images_thumbnail1_size_y_error_mandatory_missing}
                          <!-- mandatory_missing START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Field is mandatory.</div>
                            </td>
                          </tr>
                          <!-- mandatory_missing END -->
                          {/if}
                          {if $settings_images_thumbnail1_size_y_error_max_length_exceeded}
                          <!-- max_length_exceeded START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Allowed maximum of 6 characters exceeded.</div>
                            </td>
                          </tr>
                          <!-- max_length_exceeded END -->
                          {/if}
                          {if $settings_images_thumbnail1_size_y_error_not_a_number}
                          <!-- not_a_number START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Must be number.</div>
                            </td>
                          </tr>
                          <!-- not_a_number END -->
                          {/if}
                          {if $settings_images_thumbnail1_size_y_error_not_an_integer}
                          <!-- not_an_integer START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Must be integer value.</div>
                            </td>
                          </tr>
                          <!-- not_an_integer END -->
                          {/if}
                          {if $settings_images_thumbnail1_size_y_error_integer_not_positive}
                          <!-- integer_not_positive START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Value must be positive.</div>
                            </td>
                          </tr>
                          <!-- integer_not_positive END -->
                          {/if}
                          <!-- Potential errors END -->
                          {/if}
                        </table>
                        <!-- form_field_integer_positive settings_images_thumbnail1_size_y END-->
                      </td>
                    </tr>
                    <tr>
                      <td class="form_even_row">
                        <!-- form_field_integer_positive settings_images_thumbnail2_size_x START-->
                        <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                          <tr>
                            <td width="180">
                              <div align="right">Thumbnail image 2 width*:</div>
                            </td>
                            <td width="1%">
                              <input class="form" name="settings_images_thumbnail2_size_x" type="text" value="{$settings_images_thumbnail2_size_x_val}" maxlength="6" size="40" id="settings_images_thumbnail2_size_x" />
                            </td>
                            <td>
                              <div align="left"><span style="white-space:nowrap">Positive integer value.</span></div>
                            </td>
                          </tr>
                          {if $settings_images_thumbnail2_size_x_has_error}
                          <!-- Potential errors START -->
                          {if $settings_images_thumbnail2_size_x_error_mandatory_missing}
                          <!-- mandatory_missing START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Field is mandatory.</div>
                            </td>
                          </tr>
                          <!-- mandatory_missing END -->
                          {/if}
                          {if $settings_images_thumbnail2_size_x_error_max_length_exceeded}
                          <!-- max_length_exceeded START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Allowed maximum of 6 characters exceeded.</div>
                            </td>
                          </tr>
                          <!-- max_length_exceeded END -->
                          {/if}
                          {if $settings_images_thumbnail2_size_x_error_not_a_number}
                          <!-- not_a_number START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Must be number.</div>
                            </td>
                          </tr>
                          <!-- not_a_number END -->
                          {/if}
                          {if $settings_images_thumbnail2_size_x_error_not_an_integer}
                          <!-- not_an_integer START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Must be integer value.</div>
                            </td>
                          </tr>
                          <!-- not_an_integer END -->
                          {/if}
                          {if $settings_images_thumbnail2_size_x_error_integer_not_positive}
                          <!-- integer_not_positive START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Value must be positive.</div>
                            </td>
                          </tr>
                          <!-- integer_not_positive END -->
                          {/if}
                          <!-- Potential errors END -->
                          {/if}
                        </table>
                        <!-- form_field_integer_positive settings_images_thumbnail2_size_x END-->
                      </td>
                    </tr>
                    <tr>
                      <td class="form_odd_row">
                        <!-- form_field_integer_positive settings_images_thumbnail2_size_y START-->
                        <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                          <tr>
                            <td width="180">
                              <div align="right">Thumbnail image 2 heigth*:</div>
                            </td>
                            <td width="1%">
                              <input class="form" name="settings_images_thumbnail2_size_y" type="text" value="{$settings_images_thumbnail2_size_y_val}" maxlength="6" size="40" id="settings_images_thumbnail2_size_y" />
                            </td>
                            <td>
                              <div align="left"><span style="white-space:nowrap">Positive integer value.</span></div>
                            </td>
                          </tr>
                          {if $settings_images_thumbnail2_size_y_has_error}
                          <!-- Potential errors START -->
                          {if $settings_images_thumbnail2_size_y_error_mandatory_missing}
                          <!-- mandatory_missing START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Field is mandatory.</div>
                            </td>
                          </tr>
                          <!-- mandatory_missing END -->
                          {/if}
                          {if $settings_images_thumbnail2_size_y_error_max_length_exceeded}
                          <!-- max_length_exceeded START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Allowed maximum of 6 characters exceeded.</div>
                            </td>
                          </tr>
                          <!-- max_length_exceeded END -->
                          {/if}
                          {if $settings_images_thumbnail2_size_y_error_not_a_number}
                          <!-- not_a_number START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Must be number.</div>
                            </td>
                          </tr>
                          <!-- not_a_number END -->
                          {/if}
                          {if $settings_images_thumbnail2_size_y_error_not_an_integer}
                          <!-- not_an_integer START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Must be integer value.</div>
                            </td>
                          </tr>
                          <!-- not_an_integer END -->
                          {/if}
                          {if $settings_images_thumbnail2_size_y_error_integer_not_positive}
                          <!-- integer_not_positive START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Value must be positive.</div>
                            </td>
                          </tr>
                          <!-- integer_not_positive END -->
                          {/if}
                          <!-- Potential errors END -->
                          {/if}
                        </table>
                        <!-- form_field_integer_positive settings_images_thumbnail2_size_y END-->
                      </td>
                    </tr>
                    <tr>
                      <td class="form_even_row">
                        <!-- form_field_integer_positive settings_images_maximum_size START-->
                        <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                          <tr>
                            <td width="180">
                              <div align="right">Maximum size of uploaded image*:</div>
                            </td>
                            <td width="1%">
                              <input class="form" name="settings_images_maximum_size" type="text" value="{$settings_images_maximum_size_val}" maxlength="12" size="40" id="settings_images_maximum_size" />
                            </td>
                            <td>
                              <div align="left"><span style="white-space:nowrap">Positive integer value.</span></div>
                            </td>
                          </tr>
                          {if $settings_images_maximum_size_has_error}
                          <!-- Potential errors START -->
                          {if $settings_images_maximum_size_error_mandatory_missing}
                          <!-- mandatory_missing START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Field is mandatory.</div>
                            </td>
                          </tr>
                          <!-- mandatory_missing END -->
                          {/if}
                          {if $settings_images_maximum_size_error_max_length_exceeded}
                          <!-- max_length_exceeded START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Allowed maximum of 12 characters exceeded.</div>
                            </td>
                          </tr>
                          <!-- max_length_exceeded END -->
                          {/if}
                          {if $settings_images_maximum_size_error_not_a_number}
                          <!-- not_a_number START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Must be number.</div>
                            </td>
                          </tr>
                          <!-- not_a_number END -->
                          {/if}
                          {if $settings_images_maximum_size_error_not_an_integer}
                          <!-- not_an_integer START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Must be integer value.</div>
                            </td>
                          </tr>
                          <!-- not_an_integer END -->
                          {/if}
                          {if $settings_images_maximum_size_error_integer_not_positive}
                          <!-- integer_not_positive START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Value must be positive.</div>
                            </td>
                          </tr>
                          <!-- integer_not_positive END -->
                          {/if}
                          <!-- Potential errors END -->
                          {/if}
                        </table>
                        <!-- form_field_integer_positive settings_images_maximum_size END-->
                      </td>
                    </tr>
                    <tr>
                      <td class="form_odd_row">
                        <!-- form_field_integer_positive settings_images_maximum_size_x START-->
                        <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                          <tr>
                            <td width="180">
                              <div align="right">Maximum width of uploaded images*:</div>
                            </td>
                            <td width="1%">
                              <input class="form" name="settings_images_maximum_size_x" type="text" value="{$settings_images_maximum_size_x_val}" maxlength="6" size="40" id="settings_images_maximum_size_x" />
                            </td>
                            <td>
                              <div align="left"><span style="white-space:nowrap">Positive integer value.</span></div>
                            </td>
                          </tr>
                          {if $settings_images_maximum_size_x_has_error}
                          <!-- Potential errors START -->
                          {if $settings_images_maximum_size_x_error_mandatory_missing}
                          <!-- mandatory_missing START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Field is mandatory.</div>
                            </td>
                          </tr>
                          <!-- mandatory_missing END -->
                          {/if}
                          {if $settings_images_maximum_size_x_error_max_length_exceeded}
                          <!-- max_length_exceeded START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Allowed maximum of 6 characters exceeded.</div>
                            </td>
                          </tr>
                          <!-- max_length_exceeded END -->
                          {/if}
                          {if $settings_images_maximum_size_x_error_not_a_number}
                          <!-- not_a_number START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Must be number.</div>
                            </td>
                          </tr>
                          <!-- not_a_number END -->
                          {/if}
                          {if $settings_images_maximum_size_x_error_not_an_integer}
                          <!-- not_an_integer START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Must be integer value.</div>
                            </td>
                          </tr>
                          <!-- not_an_integer END -->
                          {/if}
                          {if $settings_images_maximum_size_x_error_integer_not_positive}
                          <!-- integer_not_positive START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Value must be positive.</div>
                            </td>
                          </tr>
                          <!-- integer_not_positive END -->
                          {/if}
                          <!-- Potential errors END -->
                          {/if}
                        </table>
                        <!-- form_field_integer_positive settings_images_maximum_size_x END-->
                      </td>
                    </tr>
                    <tr>
                      <td class="form_even_row">
                        <!-- form_field_integer_positive settings_images_maximum_size_y START-->
                        <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                          <tr>
                            <td width="180">
                              <div align="right">Maximum heigth of uploaded images*:</div>
                            </td>
                            <td width="1%">
                              <input class="form" name="settings_images_maximum_size_y" type="text" value="{$settings_images_maximum_size_y_val}" maxlength="6" size="40" id="settings_images_maximum_size_y" />
                            </td>
                            <td>
                              <div align="left"><span style="white-space:nowrap">Positive integer value.</span></div>
                            </td>
                          </tr>
                          {if $settings_images_maximum_size_y_has_error}
                          <!-- Potential errors START -->
                          {if $settings_images_maximum_size_y_error_mandatory_missing}
                          <!-- mandatory_missing START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Field is mandatory.</div>
                            </td>
                          </tr>
                          <!-- mandatory_missing END -->
                          {/if}
                          {if $settings_images_maximum_size_y_error_max_length_exceeded}
                          <!-- max_length_exceeded START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Allowed maximum of 6 characters exceeded.</div>
                            </td>
                          </tr>
                          <!-- max_length_exceeded END -->
                          {/if}
                          {if $settings_images_maximum_size_y_error_not_a_number}
                          <!-- not_a_number START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Must be number.</div>
                            </td>
                          </tr>
                          <!-- not_a_number END -->
                          {/if}
                          {if $settings_images_maximum_size_y_error_not_an_integer}
                          <!-- not_an_integer START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Must be integer value.</div>
                            </td>
                          </tr>
                          <!-- not_an_integer END -->
                          {/if}
                          {if $settings_images_maximum_size_y_error_integer_not_positive}
                          <!-- integer_not_positive START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Value must be positive.</div>
                            </td>
                          </tr>
                          <!-- integer_not_positive END -->
                          {/if}
                          <!-- Potential errors END -->
                          {/if}
                        </table>
                        <!-- form_field_integer_positive settings_images_maximum_size_y END-->
                      </td>
                    </tr>
                    <tr>
                      <td class="form_odd_row">
                        <!-- form_field_number settings_images_minimum_ratio_xy START-->
                        <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                          <tr>
                            <td width="180">
                              <div align="right">Minimum ratio width / height of uploaded images*:</div>
                            </td>
                            <td width="1%">
                              <input class="form" name="settings_images_minimum_ratio_xy" type="text" value="{$settings_images_minimum_ratio_xy_val}" maxlength="6" size="40" id="settings_images_minimum_ratio_xy" />
                            </td>
                            <td>&nbsp;</td>
                          </tr>
                          {if $settings_images_minimum_ratio_xy_has_error}
                          <!-- Potential errors START -->
                          {if $settings_images_minimum_ratio_xy_error_mandatory_missing}
                          <!-- mandatory_missing START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Field is mandatory.</div>
                            </td>
                          </tr>
                          <!-- mandatory_missing END -->
                          {/if}
                          {if $settings_images_minimum_ratio_xy_error_max_length_exceeded}
                          <!-- max_length_exceeded START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Allowed maximum of 6 characters exceeded.</div>
                            </td>
                          </tr>
                          <!-- max_length_exceeded END -->
                          {/if}
                          {if $settings_images_minimum_ratio_xy_error_not_a_number}
                          <!-- not_a_number START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Must be number.</div>
                            </td>
                          </tr>
                          <!-- not_a_number END -->
                          {/if}
                          <!-- Potential errors END -->
                          {/if}
                        </table>
                        <!-- form_field_number settings_images_minimum_ratio_xy END-->
                      </td>
                    </tr>
                    <tr>
                      <td class="form_even_row">
                        <!-- form_field_number settings_images_maximum_ratio_xy START-->
                        <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                          <tr>
                            <td width="180">
                              <div align="right">Maximum ratio width / height of uploaded images*:</div>
                            </td>
                            <td width="1%">
                              <input class="form" name="settings_images_maximum_ratio_xy" type="text" value="{$settings_images_maximum_ratio_xy_val}" maxlength="6" size="40" id="settings_images_maximum_ratio_xy" />
                            </td>
                            <td>&nbsp;</td>
                          </tr>
                          {if $settings_images_maximum_ratio_xy_has_error}
                          <!-- Potential errors START -->
                          {if $settings_images_maximum_ratio_xy_error_mandatory_missing}
                          <!-- mandatory_missing START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Field is mandatory.</div>
                            </td>
                          </tr>
                          <!-- mandatory_missing END -->
                          {/if}
                          {if $settings_images_maximum_ratio_xy_error_max_length_exceeded}
                          <!-- max_length_exceeded START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Allowed maximum of 6 characters exceeded.</div>
                            </td>
                          </tr>
                          <!-- max_length_exceeded END -->
                          {/if}
                          {if $settings_images_maximum_ratio_xy_error_not_a_number}
                          <!-- not_a_number START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Must be number.</div>
                            </td>
                          </tr>
                          <!-- not_a_number END -->
                          {/if}
                          <!-- Potential errors END -->
                          {/if}
                        </table>
                        <!-- form_field_number settings_images_maximum_ratio_xy END-->
                      </td>
                    </tr>
                    <tr>
                      <td class="form_odd_row">
                        <!-- form_field_text settings_images_watermark_image START-->
                        <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                          <tr>
                            <td width="180">
                              <div align="right">Watermark image:</div>
                            </td>
                            <td width="1%">
                              <input class="form" name="settings_images_watermark_image" type="text" value="{$settings_images_watermark_image_val}" maxlength="255" size="40" id="settings_images_watermark_image"/>
                            </td>
                            <td>Path to image file (relative to site root)</td>
                          </tr>
                          {if $settings_images_watermark_image_has_error}
                          <!-- Potential errors START -->
                          {if $settings_images_watermark_image_error_mandatory_missing}
                          <!-- mandatory_missing START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Field is mandatory.</div>
                            </td>
                          </tr>
                          <!-- mandatory_missing END -->
                          {/if}
                          {if $settings_images_watermark_image_error_max_length_exceeded}
                          <!-- max_length_exceeded START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Allowed maximum of 255 characters exceeded.</div>
                            </td>
                          </tr>
                          <!-- max_length_exceeded END -->
                          {/if}
                          <!-- Potential errors END -->
                          {/if}
                        </table>
                        <!-- form_field_text settings_images_watermark_image END-->
                      </td>
                    </tr>
                    <tr>
                      <td class="form_even_row">
                        <!-- form_field_integer_positive settings_images_watermark_position START-->
                        <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                          <tr>
                            <td width="180">
                              <div align="right">Watermark position:</div>
                            </td>
                            <td width="1%">
                              <input class="form" name="settings_images_watermark_position" type="text" value="{$settings_images_watermark_position_val}" maxlength="1" size="40" id="settings_images_watermark_position" />
                            </td>
                            <td>
                              <div align="left"><span style="white-space:nowrap"><img src="/img/modules/crystal_icons_small/16x16/help.png" alt="help" width="16" height="16" {popup text="Position of the logo/watermark.<br> 0 = bottom left,<br> 1 = top left,<br> 2 = top right,<br> 3 = bottom right,<br> 4 = center"} /></span></div>
                            </td>
                          </tr>
                          {if $settings_images_watermark_position_has_error}
                          <!-- Potential errors START -->
                          {if $settings_images_watermark_position_error_mandatory_missing}
                          <!-- mandatory_missing START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Field is mandatory.</div>
                            </td>
                          </tr>
                          <!-- mandatory_missing END -->
                          {/if}
                          {if $settings_images_watermark_position_error_max_length_exceeded}
                          <!-- max_length_exceeded START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Allowed maximum of 1 characters exceeded.</div>
                            </td>
                          </tr>
                          <!-- max_length_exceeded END -->
                          {/if}
                          {if $settings_images_watermark_position_error_not_a_number}
                          <!-- not_a_number START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Must be number.</div>
                            </td>
                          </tr>
                          <!-- not_a_number END -->
                          {/if}
                          {if $settings_images_watermark_position_error_not_an_integer}
                          <!-- not_an_integer START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Must be integer value.</div>
                            </td>

                          </tr>
                          <!-- not_an_integer END -->
                          {/if}
                          {if $settings_images_watermark_position_error_integer_not_positive}
                          <!-- integer_not_positive START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Value must be positive.</div>
                            </td>
                          </tr>
                          <!-- integer_not_positive END -->
                          {/if}
                          <!-- Potential errors END -->
                          {/if}
                        </table>
                        <!-- form_field_integer_positive settings_images_watermark_position END-->
                      </td>
                    </tr>
                    <tr>
                      <td class="form_odd_row">
                        <!-- form_field_text settings_images_upload_path START-->
                        <table width="100%" border="0" cellpadding="3" cellspacing="0" class="form_row">
                          <tr>
                            <td width="180">
                              <div align="right">Upload path:</div>
                            </td>
                            <td width="1%">
                              <input class="form" name="settings_images_upload_path" type="text" value="{$settings_images_upload_path_val}" maxlength="255" size="40" id="settings_images_upload_path"/>
                            </td>
                            <td>
                              <img src="/img/modules/crystal_icons_small/16x16/help.png" alt="help" width="16" height="16" {popup text="Directory where uploaded images will be stored. Relative to site_root/scratch/uploads/."} />
                            </td>
                          </tr>
                          {if $settings_images_upload_path_has_error}
                          <!-- Potential errors START -->
                          {if $settings_images_upload_path_error_mandatory_missing}
                          <!-- mandatory_missing START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Field is mandatory.</div>
                            </td>
                          </tr>
                          <!-- mandatory_missing END -->
                          {/if}
                          {if $settings_images_upload_path_error_max_length_exceeded}
                          <!-- max_length_exceeded START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: Allowed maximum of 255 characters exceeded.</div>
                            </td>
                          </tr>
                          <!-- max_length_exceeded END -->
                          {/if}
                          {if $settings_images_upload_path_error_invalid_path}
                          <!-- invalid_path START -->
                          <tr>
                            <td></td>
                            <td colspan="2">
                              <div class="form_error_message">Error: {include  file="modules/tangra_cms/forms/field_errors/settings_images/`$_language`/field_error_invalid_path_`$_language`.tpl"}</div>
                            </td>
                          </tr>
                          <!-- invalid_path END -->
                          {/if}
                          <!-- Potential errors END -->
                          {/if}
                        </table>
                        <!-- form_field_text settings_images_upload_path END-->
                      </td>
                    </tr>                    
                  </table>
                  <input type="hidden" name="settings_images_form_id" value="{$settings_images_form_id_val}" id="settings_images_form_id"/>
                  <input type="hidden" name="settings_images_guard_value" value="{$settings_images_guard_value_val}" id="settings_images_guard_value"/>
                </td>
              </tr>
              <tr>
                <td align="left">
                  <table width="100%" border="0" cellpadding="0" cellspacing="0" class="submit_row">
                    <tr>
                      <td width="180">&nbsp;</td>
                      <td width="100" align="left">
                        <input name="settings_images_submit" type="submit" value="Save" class="form_submit" />
                      </td>
                      <td width="50">&nbsp;</td>
                      <td>
                        <div class="form_cancel"><a href="admin/modules/tangra_cms/settings/settings.php">Cancel</a></div>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </form>
        </div>
      </td>
    </tr>
  </table>
  <!-- *** CUT bottom -->
